home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun: Game Pak / rerun-gamepak / hassle castle (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1988-01-01  |  19.9 KB  |  235 lines

  1. 0 rem"            by fred s. randall
  2. 1 [143]"         box 184d, blackstone st.                   uxbridge ma.01569
  3. 3 rem"            tel. 617-278-3117
  4. 4 [143]"
  5. 5 dimdn$(24):dn$(0)="":fori=1to24:dn$(i)=dn$(i-1)+"":next:dima$(112):dima(18):dimf$(20):printchr$(142):s1=54272:ca=25:gosub4000:gosub9650
  6. 10 poke53280,1:poke53281,1:print"[147][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][145]":fori=1to20:geta$:print"[145][166]                                      [166]":next:print"[145][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]":print"[169]         [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]         [223]"
  7. 55 printtab(7)"****** commodore 64 ******":printtab(18)"[169] [223]":printtab(18)"[145] [146] [164][164][146][169][145]":printtab(18)" [146] [163][163][223]":printtab(18)"[145][223] [146][169]":print" do you want to read the scenario?"
  8. 85 printtab(16)"[145](y or n)":fort=1to300:next:geta$:printtab(16)"[145](y or n)":fort=1to300:next:ifa$=""then85
  9. 95 ifa$="y"thenl=20:ca=2:gosub4500
  10. 98 print"[147]":poke53280,0:poke53281,0:s1=54272:gosub5530:restore:l=20:e=100:s=12:ti$="000000":s1=54272:pw=0:sc=0:k=0:tr=0:au=0:ca=0:fori=0to111:reada$(i):next:fori=0to19:readf$(i):next:r=rnd(-.9):goto154
  11. 125 forx1=1to24:pokes1+x1,0:next:return
  12. 150 ifz=1then170
  13. 153 gosub300:ife>250orr<2then800
  14. 154 q=6+(1andl<2):ifl>20ande<50thengosub9300
  15. 155 gosub300:ifl<0orau>350ands>3andr<10thengosub400
  16. 156 forb=1to3:a(b)=int(rnd(1)*q)+1:ifa(b)<3thengosub900
  17. 157 next:ifl>25then650
  18. 158 ifa(1)=3anda(2)=3anda(3)=3then156
  19. 159 ifa(1)=7ora(2)=7ora(3)=7thenpw=1:gosub1000:gosub3200:goto170
  20. 160 hp=0:gosub1000:ona(1)gosub2200,2200,169,2000,2600,2800:ona(2)gosub3000,3000,169,3100,2500,2400:ona(3)gosub2300,2300,169,2100,2700,2900
  21. 167 geta$:ifa$<>""then167
  22. 168 goto170
  23. 169 return
  24. 170 z=0:gosub200:printtab(11)"[158]which direction?":print"[155] ([158]l[152]-left, [158]f[152]-forward, [158]r[152]-right, [158]s[152]-status)";
  25. 172 b=0:geta$:b$=a$:ifa$=""then172
  26. 173 b=b+(1andb$="l")+(2andb$="f")+(3andb$="r"):ifb$="s"then350
  27. 176 ifb<1thengosub530:gosub200:goto170
  28. 177 ifpw=1then450
  29. 178 ona(b)gosub550,550,250,9900,9700,9800:gosub200:gosub300:ifr>85thengosub500
  30. 180 iftr>9andr<trthengosub700
  31. 181 goto150
  32. 200 printdn$(16):forx=1to7:print"                                       ":next:printdn$(16):return
  33. 250 gosub200:print"[129]    you walked into a wall,stupid![155]":fort=1to1000:z=1:next:ifr>50thengosub200:return
  34. 260 print"[129] it's unstable,it crumbles! rocks fall!":print" you are knocked to the ground, costing":print" you ";r,"units of energy![155]":e=e-r:fort=1to3000:next:gosub200:return
  35. 300 r=int(rnd(1)*101):return
  36. 301 r=int((rnd(1)*32)+1):return
  37. 302 m=int(rnd(1)*101):return
  38. 303 q=int(rnd(1)*10)+102:return
  39. 350 gosub200:print"[158][145]":ife>=100thenprint"[145]"
  40. 352 ife>200ore<50orau>350ands>3thenprint"[129][145]"
  41. 354 printtab(6)"remaining energy -"e:printtab(6)"remaining spells -"s:printtab(11)"gold pieces -"au:printtab(7)"creatures slain -"k:printtab(7)"treasure credit -"tr:tx$=ti$:tp$=left$(tx$,2)+":"+mid$(tx$,3,2)+":"+right$(tx$,2):print"[158] time - "tp$;:sc=(au+(1andau=0))*(k+(1andk=0))*(tr+(1andtr=0))
  42. 370 printspc(5)"score -"sc-(1andsc=1):fort=1to1000:next
  43. 371 ifpeek(197)=13then371
  44. 372 gosub200:goto170
  45. 400 print"[147][158]":poke53281,9:poke53280,9:printdn$(8)tab(13)"gold grabbers!":print" hundreds of little gold grabbers swarm":print"[158] around you, scooping up all your gold!":print" then they drag you off, depositing you":au=0:l=l+1:print" on level[153]";l:print"[144]":gosub10350:ifl<3thene=0:s=0:tr=0
  46. 414 fort=1to4000:next:poke53280,11:poke53281,0:return
  47. 450 gosub9650:iftr<10thentr=10
  48. 452 poke53280,0:tx$=ti$:tp$=left$(tx$,2)+":"+mid$(tx$,3,2)+":"+right$(tx$,2):gosub4000:printtab(10)"congratulations!!":sc=au*tr*k:print" your score is"sc"(hit shift)":gosub5600
  49. 458 poke53280,1:poke53281,1:print"[147][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][145]":fori=1to21:print"[145][166]                                      [166]":next:print"[145][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]":print"[169]         [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]         [223]"
  50. 466 print"[145] ******** [146] hassle  castle  ******** ":print"[223]                                  [146][169]":printtab(14)"[151]score totals":printtab(9)"gold pieces -[151]";au:printtab(5)"monsters killed -[151]"k:printtab(5)"treasure credit -[151]"tr:printtab(4)"remaining energy -[151]"e:printtab(4)"remaining spells -[151]"s
  51. 480 printtab(5)"total game time -[151] "tp$:printtab(9)"total score -[151]"sc:geta$:ifa$<>""thena$=""
  52. 484 printtab(8)"[151] another game?(y or n) [145]":fort=1to300:next:geta$:printtab(22)"[155](y or n) [145]":fort=1to300:next:ifa$=""then484
  53. 488 ifa$="y"thengoto10
  54. 490 ifa$<>"n"then484
  55. 492 ca=100:gosub4000:print"[144]":end
  56. 500 gosub302:gosub200:gosub600:print"[155] faces you!   "
  57. 507 print"[158] well? [155]([158]c[155]-combat,[158]s[155]-spellcast,[158]r[155]-retreat)":gosub1300:n=0:b$=a$:ifb$<>"s"andb$<>"r"andb$<>"c"thengosub530:gosub200:goto507
  58. 510 ifb$="c"thenn=1:gosub9000:goto516
  59. 512 ifb$="s"thenn=1:gosub9100:goto516
  60. 514 ifb$="r"thengosub300:l=l+1:printtab(15)"[129]wait![158]":ifr<40then525
  61. 515 ifb$="r"thenn=2:z=0:goto520
  62. 516 ifn<1then507
  63. 520 fort=1to2000:next:return
  64. 525 print" oh no..it's chasing you..combat mode![145][145]":fort=1to2000:next:goto9000
  65. 530 gosub200:print"[156] what do you mean,[155]"chr$(34)b$chr$(34)"[156]? that's foolish!":print"[145][145]":fort=1to2000:next:n=0:return
  66. 550 gosub200:print"[158]      door[155] ([158]o[155]-open or [158]l[155]-listen)?":hp=0
  67. 552 gosub1300:b$=a$:ifb$<>"l"andb$<>"o"thengosub530
  68. 554 ifb$="l"thenn=1:goto560
  69. 556 ifb$="o"thenn=1:goto9400
  70. 557 ifn<1then550
  71. 558 goto552
  72. 560 gosub200:printtab(6)"[155]you hear ";:ifa(b+3)>0thenprinta$(a(b+3));"[155] noises!"
  73. 564 ifa(b+3)=0thenprint"[155]..........nothing."
  74. 566 print"[158] now what? [155]([158]g[155]-go in,[158]l[155]-leave,or [158]h[155]-help)":gosub1300:b$=a$:ifb$="g"then9400
  75. 572 ifb$="l"then578
  76. 574 ifb$="h"then950
  77. 576 gosub530:goto566
  78. 578 print"[145]       -------[158] coward! -------         [145]":fort=1to500:next:z=1:ifint(rnd(0)*100)<10then800
  79. 582 gosub200:print"[145][145][145][145]":return
  80. 600 gosub10000:print"[155] a";:ad=int(rnd(.)*6)+1:onadgoto606,608,610,612,614,616
  81. 606 print"n immense ";:goto618
  82. 608 print" hideous ";:goto618
  83. 610 print" humungous ";:goto618
  84. 612 print" gigantic ";:goto618
  85. 614 print"n ugly ";:goto618
  86. 616 print" monstrous ";:goto618
  87. 618 printa$(m);:return
  88. 650 gosub708:print"[147][155]":printchr$(14):print""tab(7)"it seems too bad.......":print"[212]he walls are starting to crumble and":print"pieces of the ceiling are falling all":print"around you![217]ou must have gone into an":print"unsafe area of the dungeons!":fori=1to3000:next
  89. 662 poke53281,int(rnd(.)*15)+1:gosub708:poke53281,0:fort=1to2000:next:print"[201]n the future, try to be a little":print"more careful about going so deep in..":print"[158][212][200][197][160][196][213][206][199][197][207][206][211][160][207][198][160][200][193][211][211][204][197][160][195][193][211][212][204][197]!":poke53281,int(rnd(.)*15)+1:gosub708:poke53281,0:fori=1to10000:next:print"[147]";chr$(142):sc=au*k:goto9020
  90. 700 gosub200:print"[129]   tremor!!..a wall is crumbling!":tr=tr-int(rnd(.)*4)+1:print"   some of your treasures are lost!!"
  91. 708 gosub10400:forp=1to3:fori=1to12:poke53270,i:fort=1to25:next:poke53270,8:fort=1to25:next:next:next:gosub10406:return:data"mad jogger","programmer","whomp rat","killosaur","megasaurus":data"gigasaurus","fire lizard","mad hatter","no.1 robot","no.2 robot"
  92. 752 data"mad hacker","megabyter","cruncher","iguanadon","rabid wolf":data"[129]red knight","[154]mugwumpus","[154]wax mummy","[154]mad wizard","[150]blood wolf":data"[154]fire ghost","[156]purple pox","[154]bystander","[129]blood hulk","[153]green hulk"
  93. 755 data"[153]slime rat","[129]blood newt","[156]fire witch","[154]blue witch","[150]red witch":data"[129]red wizard","[153]horned bat","[153]killer bat","[154]slime hulk","[154]stegosaur":data"[153]moonshiner","[154]moon devil","[153]flesh eater","fire worm","[129]manticore"
  94. 758 data"[156]mud sucker","[154]blue smurf","[153]dill pickle","[159]mud spitter","[159]pit spider":data"[154]red spider","[149]black widow","[156]man eater","[154]fang wolf","[154]claw robot":data"[129]red crusher","[156]drogonizer","[154]ice lizard","[155]iron tiger","[155]iron robot"
  95. 761 data"[155]iron ghost","[155]iron mummy","[155]iron witch","[156]gag wumpus","[153]sand witch":data"sand hulk","sand wolf","[129]pit crusher","[129]fire eater","killer rat":data"[129]fire cat","bat lizard","[129]megadonkey","mud beast","[154]ice beast"
  96. 764 data"[129]fire beast","iron beast","[154]iron claw","[129]wolf hulk","[154]mandrill":data"[129]fire ghoul","[129]mud ghoul","[129]iron ghoul","[129]swamp rat","[129]swamp bat":data"[129]swamp hulk","[129]swamp devil","[129]fire devil","[129]red mauler","[129]mauler cat"
  97. 767 data"steel claw","[156]pulverizer","[150]mangelizer","[129]pit crawler","[129]red crawler":data"[129]fire tiger","[129]pit viper","[156]sabertooth","[153]anaconda","[156]idiot","rat fink":data"[129]devil wolf","[154]pterosaur","[129]stone hulk","[153]executioner","[158]tax agent"
  98. 771 data"gold pieces","a magic sceptre","[154]a suit of armor","[129]a gilded crown":data"[150]an ancient manuscript","[153]a pearl necklace","[154]a secret potion":data"[156]a mysterious box","[129]a book of wisdom","[158]a golden pendant"
  99. 774 data"a tiara of gold",pounds,slugs,slams,smashes,beats,"on the head":data"against the wall","on the back","to the floor","into a door"," claw! ":data" lance! "," club! "," brick! "," mace! ","stunned!","hurt!","reeling!":data"staggered!","not amused!"
  100. 800 gosub300:ifl>23orr<l*2thengosub9300:goto154
  101. 808 ifl>25thengosub650
  102. 810 gosub10300:gosub200:z=0:print"  a trap door opens! you plunge down a":gosub300:ifr<20thenr=20
  103. 812 print"[145]";int(r/2);"foot shaft,to level";:l=l+int(r/12):printl:gosub300:ife>250thenprint" and into a pool of dragon's blood. you"
  104. 816 ife>250thenprint" use most of your energy getting out!":e=int(e*.3):goto822
  105. 818 ife>150thenprint"you land on your head,causing an injury"
  106. 820 ife>150thenprint" that takes";int(e/2);"units of energy to heal":e=int(e/2)
  107. 822 fort=1to4000:next:goto154
  108. 850 gosub200:gosub9500:gosub854:print" it "f$(i)" you ";:gosub854:printf$(i+5)" with a":gosub854:printf$(i+10)" you are ";:gosub854:printf$(i+15):return
  109. 854 i=int(rnd(.)*5):return
  110. 900 forc=3to6step3:gosub300:ifr>60thena(b+c)=r
  111. 902 gosub300:ifa(b+c)>0thena(b+c)=r
  112. 903 next:forc=9to15step3:gosub300:ifr>75thena(b+c)=r
  113. 905 gosub301:ifa(b+c)>12thena(b+c)=r
  114. 906 ifa(b+c)>0andr<13thena(b+c)=int(rnd(1)*2)
  115. 907 next:return
  116. 950 gosub200:ifhp=1thenprint"[153]you've had all the help you're getting!":goto566
  117. 952 ifa(b+3)>0thenprint"  the [155]";a$(a(b+3))" has[155]"a(b+3)"energy unit";
  118. 953 ifa(b+3)<>0anda(b+3)<>1thenprint"s"
  119. 954 ifa(b+3)=0thenprint"[153]   it  seems safe...for the moment."
  120. 955 ifa(b+3)=1thenprint" "
  121. 960 hp=1:goto566
  122. 1000 print"[147][152]":poke53280,11:poke53281,0:forv=1to16:print"[167]":next:print"":ford=1to4:printtab(d)"[205]":next:printdn$(15):ford=1to4:printtab(d)"[206][145][145]":next:printdn$(4):forv=1to8:printtab(4)"[167]":next:printdn$(4)tab(5)"[164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]":printdn$(13)tab(5)"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]":printdn$(4):forv=1to8:printtab(31)"[165]":next:ford=1to4:printtab(30+d)"[205]":next
  123. 1080 printdn$(3):ford=1to4:printtab(30+d)"[206][145][145]":next:print"":forv=1to16:printtab(35)"[165]":next:printdn$(5)tab(5)"[151][173][173][173][173][173][173][173][173][173][173][173][173][173][173][173][173][173][173][173][173][173][173][173][173][173][173][146]":fori=1to7:printtab(5)"                          [146]":next:print""tab(11)"[158]you are now at":print""tab(13)"level "l:print""tab(37)"[158]l[157]l[157]a[157]d[157]n[157]a[157]r[157]c[157]a[157]s[157]t[157]l[157]e"
  124. 1140 printdn$(7)tab(8)"[129]*[157][151][221][146]"tab(27)"[145][129]*[157][151][221][146]":return
  125. 1300 :
  126. 1305 geta$:ifa$<>""then1305
  127. 1310 geta$:ifa$=""thengosub10100:ifa$=""then1310
  128. 1320 pokes1+24,0:return
  129. 2000 printdn$(4):forv=1to11:printtab(1)"[152][167]":next:printtab(2)"[145] [145] ":printdn$(5):forv=1to8:printtab(3)"[167]":next:printtab(2)"[145][175][186][157][154]passage[152]":printdn$(5)tab(2)"[205][205][157][157][183][208]":return
  130. 2100 printdn$(5):forv=1to8:printtab(32)"[152][165]":next:printtab(32)"[145][204][175][157][157] ":printdn$(4):forv=1to11:printtab(34)"[152][165]":next:printtab(33)"[145] ":printdn$(6)tab(32)"[207][183][157][157][145][206][145][206]"dn$(15)tab(26)"[154]passage":return
  131. 2200 printdn$(4):forv=1to11:printtab(1)"[152][167]":next:printdn$(5):forv=1to8:printtab(3)"[167]":next:printdn$(5)tab(2)"[205][205]":printdn$(7)"[157][158][161][152][146][157][209][157][154]door":return
  132. 2300 printdn$(5):forv=1to8:printtab(32)"[152][165]":next:printdn$(4):forv=1to11:printtab(34)"[165]":next:printdn$(6)tab(32)"[206][145][206]":printdn$(8)tab(33)"[158][161][152][157][209][157][157][157][157][157][154]door":return
  133. 2400 printdn$(6):forv=1to6:printtab(13)"[151][170][167][144]    [151][165][180][146][152]":next:print"":fori=1to3:print"[145][145]"tab(14)"[196][196][196][196][196][162][146]":next:print"[145][145]"tab(17)"[185][184] [146]":print"[145][145][145]"tab(16)"[154]up":return
  134. 2500 printdn$(6):forv=1to6:printspc(14)"[152][167][144]    [146][152][167]":next:print"":print"[145][145][145]"tab(14)"[169][183][146][185][185][185][152][186]":print"[145][145][145][145][145][145][145]"tab(14)"[151]      [146]":print""tab(15)"[154]down":return
  135. 2600 printdn$(4):forv=1to11:printtab(1)"[152][167]":next:printtab(2)"[145] [145] ":printdn$(5):forv=1to8:printtab(3)"[167]":next:printtab(2)"[145][175][186]":printdn$(5)tab(2)"[205][205]":printdn$(7)"[206][208][157][157] [157][206][154]down":return
  136. 2700 printdn$(5):forv=1to8:printtab(32)"[152][165]":next:printtab(32)"[145][204][175][157][157] ":printdn$(4):forv=1to11:printtab(34)"[165]":next:printtab(33)"[145] [145][157][205][145][157] ":printdn$(6)tab(32)"[206][145][206][157][157][207][205][157][157][157][157][157][154]down ":return
  137. 2800 printdn$(4):forv=1to11:printtab(1)"[152][167]":next:printtab(2)"[145] [145] ":printdn$(5):forv=1to8:printtab(3)"[167]":next:printtab(2)"[145][208][186][157][157][206][154]up[152]":printdn$(5)tab(2)"[205][205][157][157][183][208]":return
  138. 2900 printdn$(5):forv=1to8:printtab(32)"[152][165]":next:printtab(32)"[145][204][207][157][157] [205][157][157][157][154]up":printdn$(4):forv=1to11:printtab(34)"[152][165]":next:printtab(33)"[145] ":printdn$(6)tab(32)"[207][183][157][157][145][206][145][206]":return
  139. 3000 printdn$(6)tab(15)"[151]     [146][152]":forv=1to6:printtab(15)"[180]    [170]":next:print"[145][145][145][145][145]"tab(17)"[158][219][219][146][152][209][157][157][157][157][154]door":return
  140. 3100 printdn$(6)tab(15)"[151]      ":printdn$(7)tab(14)"[151] [146][152][205][164][164][164][164][206][151] [146][152]":forv=1to5:printtab(15)"[170][151][166][166][166][166][152][146][165]":next:printtab(15)"[145][206]    [205][157][157][157][157][157][157][157][154]passage":printtab(15)"[151][145][145][145][145][163][163][163][163][152]":printdn$(13)tab(15);"      ":return
  141. 3200 printdn$(4)tab(13)"          ":printdn$(5)tab(13)"[205][164][164][164][164][164][164][164][164][206]":forv=1to6:printtab(13)"[167][149]   [217][212]   [146][165]":next:printdn$(6):fori=1to3:printtab(15)"[158]    [146]":next:printdn$(12)tab(13)"[206][163][163][163][163][163][163][163][163][205]":printtab(13)"[129]   exit!  ":return
  142. 4000 poke53280,0:poke53281,0:print"[147]":printdn$(9)tab(11)"[165]":printtab(13)"[151][169][223][157][157][157][151][169]  [223][157][157][157][157][152][146][178][158][178][129][178][146][155][178][157][157][157][157][151][146][223] [152] [146][169]":printtab(13)"[152] [221][157][157][152]  "spc(16)"[158][146]  [157][157][146][212]":printtab(13)"[145][152][221] "spc(12)"[151][221][152][221][221][221][221][145]""":printtab(10)"[151][169][223][152] [221]"spc(8)"[154][146][165]":printtab(10)"[152][180][155][170][146][151][164][152]  [146][151][164][164][164][164][164][164][164][169][223][146][151][164][164][164][151] [152]    "
  143. 4060 printtab(9)"[151][167][152][221][155][146][169][152][221] [151][186][186][186][186][186][186][169]  [223][151][186][186] [152] [221]  ":printtab(9)"[151][167][152][151][169][146][169][152]  [144]      [165][161][161]  [144][167][151][221][152]    ":printtab(7)"[151][169][164] [207][207][207][207][207][207][207][207][207][207][207][207][207][207][207][207][152][207][151][165][152]   [221]":printtab(8)"[155][221] [165]               [152] [151][165][152]  [221] ":printtab(5)"[151][169]    [165] [166][166] [146][169]   [223]  [161]   [152] [151][165][152][221]   [151] [223]"
  144. 4110 printtab(6)"[155][163][163][163][163][165] [166][166] [158][146]*[149][166][166][166][158][146]*     [161][152] [151][165][152]    [165][182]":printtab(4)"[151][169][155] [221][221] [165]    [221][149][166][166][166][221]      [152] [151][165][152]  [221] [165][182][151][223]":print"[151][169] [144] [155][164][164][164][164][165]     [149][166][166][166]       [152] [151][165][152]    [180][182][151] [223]":print"[145][151][169]  [223][146][223][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][223][151][146][223][152][185][185][185][146][169][151][169]   [223]"
  145. 4150 print"[145][151][169]                                   [223]":print"             [158]hassle  castle[144]":gosub6000:ifca=25thenprint"[145][158]adjust monitor volume, then hit any key"
  146. 4230 ifca=25thengeta$:gosub6000:ifa$=""then4230
  147. 4235 ifca=25thenreturn
  148. 4240 s1=54272:gosub10400:gosub8000:fori=15to0step-1:pokes1+24,i:fort=1to100:next:next:printdn$(17)tab(16)"[151][168][168][168]":gosub8300:printtab(16)"[145][151][158][165][144][167][158][167]":gosub8300:printtab(16)"[151][158][165][144] [158][167]":gosub8300:printtab(16)"[144][168][168][168]":gosub8300:printtab(15)" [129][166][166][166]":gosub8200:ifl<2thenreturn
  149. 4305 geta$:ifa$<>""then4305
  150. 4310 print"[158]      hit space bar when ready."
  151. 4320 geta$:ifa$=""thengosub6000:goto4320
  152. 4360 return
  153. 4500 poke53280,0:poke53281,15:print"[147][144] [146][169][165]  [149][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][144]":print"[169] [165]  [149] the legend of lladnar castle [146][144]      [145]":print"[145][183][184] [149]y[144][146]ou are an explorer and adventurer. ":print"  your travels have led to a secluded  "
  154. 4550 print"  valley hidden in the remote reaches  ":print"  of central wales.             ":print"    nearby, stands the ruin of castle  ":print"  lladnar, the secret hiding place of  ":print"  the treasures of derf lladnar, earl[163][208][223]"
  155. 4600 print"  [145]of llansfair, and doer of evil. the  [145][184]":print"  treasure, (according to legend), is":print"  buried under the castle in dungeons":print"  many levels deep.";:print" (hit shift)":gosub5600:print"    s[144][146]tories told in taverns, where the"
  156. 4650 print"  consumption of strong drink had made ":print"  the mind hazy, and the tongue loose, ":print"  were consistent in only two areas. [163][208][223]"spc(39)"[163]":print"[145]    first, no one who had seen "chr$(34)"castle":print"  lladnar"chr$(34)" had lived to tell about it,"
  157. 4700 print"  and, second, the stories always told ":print"[169][165]of "chr$(34)"daemons"chr$(34)", watching over the gold. [163]":print"   the tales had intrigued you, so you":print"  verified them using ancient records.":print"  you then gathered supplies, and set "
  158. 4740 print"  off on foot.  (hit shift)":gosub5600:print"  ...a[144][146]nd so you travel alone, trusting":print"[169][180] no one except yourself. you follow,":print"[184] (with difficulty), an odd map you've":print"  unearthed in the musty cellars of an"
  159. 4810 print"  old monastery. you make a turn, then":print"  you see it, and you move in! thunder":print"  crashes.. lightning rips through the":print"  sullen sky.. you see the banners and":print"  pennants, flaying in the wind... you"
  160. 4860 print"  move closer still! the drawbridge is[208][146][223][146]":print"  lowering! lights from the huge doors[145] [184]":print"  beckon you..inside!! (hit shift)":gosub5600:gosub4000:poke53281,1:print"[147]   y[151][146]ou look around an immense,totally ":print"  vacant room.then,suddenly,without a "
  161. 4920 print"  warning,the floor gives way,and you ":print"  tumble headlong down a long tunnel, ":print"  falling...falling...your head slams":print"  a boulder,and everything goes black!":fort=1to6000:next:poke53281,0:gosub708
  162. 4970 print"        press shift to continue        [145][145][158]":gosub5600:print"[147]":gosub1000:printdn$(7)tab(16);"[158][207][183][208][157][157][157][180] [170][157][157][157][204][175][186]":poke53280,0:print"[152]you awaken in an area dimly":print"  lit by a pair of torches attached":print"to the wall farthest from you.on this"
  163. 5040 print"wall you perceive a plaque.(hit shift)":gosub5600:print"[147][155]     the plaque reads as follows:":print"[158][209]                                      [209]":print"[145][158]  you are on the twentieth level of the ":s$="[145]                                        "
  164. 5090 prints$" dungeons of lladnar.all those who have ":prints$" gone before you have perished in agony.":prints$"  to survive,you must find the way out, ":prints$" and you must deal with my many beasts, ":prints$" which stalk you even as you read this. "
  165. 5140 prints$" i have provided generously for you,and ":prints$" if you are wise,and possess sufficient ":prints$" courage,you will survive and gain vast ":prints$" wealth.if not you will surely succumb. ":prints$"[146]             (hit shift)[145][158]":gosub5600
  166. 5190 prints$"[145]  in the interest of your survival, and ":prints$" to make my little game as interesting, ":prints$" and pleasurable as is possible,you are ":prints$" hereby granted a few special weapons.  ":prints$"  first,you are endowed with a dozen of "
  167. 5240 prints$" my court magicians finest fatal spells.":prints$"  you must be careful,however,for some  ":prints$" of my pets have a remarkable immunity  ":prints$" to them. (although most have not.)     ":prints$"  you are also to have at your disposal "
  168. 5290 prints$" an enchanted sword,and to energize it..":prints$"[146]              (hit shift)[158][145][145]":gosub5600:prints$"[145] you are also granted one hundred units ":prints$" of raw energy,to be used against those ":prints$" of my children who shall confront you. "
  169. 5340 prints$"  at the onset of your ordeal,the power ":prints$" you possess will be so great that none ":prints$" of my beasts will be able to harm you, ":prints$" but it will be diminished by the exact ":prints$" amount possessed by any beast you slay."
  170. 5390 prints$" to replenish it,you must enter a cell, ":prints$" or else risk death at a monsters hand! ":prints$" (or claw, or other weapon!!)           ":prints$:print"             (hit shift)[145][158]":gosub5600:prints$"[145]  the cells contain gold,artifacts,more "
  171. 5430 prints$" energy units and additional spells,but ":prints$" my creatures lurk in them too. beware! ":prints$" other perils exist within these walls, ":prints$" and you must learn to avoid them,or at ":prints$" least to survive them.if you reach the "
  172. 5480 prints$" surface,at level one or level zero you ":prints$" will sooner or later find an exit, and ":prints$" you may leave.be careful not to go any ":prints$" higher than level zero....or else!!    ":prints$:print"[145][158][209]                       (signed) d.l.  [209]"
  173. 5510 print"             (hit shift)[145][158]":gosub5600:print"[147]":a=0:return
  174. 5530 print""tab(13)"[158]hassle castle!":gosub9650:return
  175. 5600 wait653,1:wait653,1,1:return
  176. 6000 print"";tab(14);"[207][149][163][163]":fori=1to35:next:printdn$(8)tab(31)"[154][162]  [145][157][157][185][175][164] [145]":fori=1to35:next:printdn$(9)tab(23)"[169]":fori=1to35:next:printdn$(8)tab(31)"[162]  [157][157][184][198][145] ":fori=1to35:next:print""tab(14)"[207][196] ":fori=1to35:next:printdn$(9)tab(23)"[223]":fori=1to35:next:printdn$(23):return
  177. 8000 fort=1to8:poke53280,6:poke53281,6:fori=1toint(rnd(.)*100):next:poke53280,0:poke53281,0:fori=1toint(rnd(1)*100)+50:next:next:return
  178. 8200 gosub125:forx1=15to0step-1:pokes1+24,x1:pokes1+4,129:pokes1+5,15:pokes1+1,45:pokes1,200:next:pokes1+4,128:pokes1+5,0:return
  179. 8300 gosub125:pokes1+24,15:forx1=1to3:pokes1+4,19:pokes1+5,10:pokes1+1,150:pokes1+4,18:fort=1to90:next:next:pokes1+4,0:pokes1+5,9:return
  180. 9000 gosub850:print" you had a terrible struggle with the":print" "a$(m);:gosub9500:ife>=mthenprint"[155],but you destroyed it!":gosub10200
  181. 9010 ife>=mthene=e-m:k=k+1:n=1:return
  182. 9012 gosub9550:poke53280,0:print"";:fori=1to1000:print" ";:next:tr=0:printdn$(11)spc(9)"[158]and you were killed!!":tr=1:sc=au*k*tr:fort=1to3000:next:poke53281,0:print"[147][152]       your final score is"sc:poke53280,0:tx$=ti$:tp$=left$(tx$,2)+":"+mid$(tx$,3,2)+":"+right$(tx$,2)
  183. 9020 print"        elapsed time - ";tp$:printdn$(23)tab(9);"hit shift for totals":gosub5600:goto458
  184. 9050 gosub200:print"  hmm...you seem to be out of spells!":n=0:return
  185. 9100 gosub200:ifs<1then9050
  186. 9102 gosub9850:s=s-1:gosub300:print:ifr>mthenprint"your spell has crushed the ";a$(m);"[155],"
  187. 9105 ifr>mthenprint"[155] it lies dead at your feet!![145]"
  188. 9106 ifr>mthenk=k+1:gosub10200:return
  189. 9108 print" the ";a$(m);"[155] is not impressed![155]":ifr>26then9116
  190. 9110 print:fori=1to7:print"[145] it attacks.........[129]combat mode![155]":fort=1to100:next:printtab(20)"[145][144]            [146][155]":fort=1to100:next:next:goto9000
  191. 9116 n=0:return
  192. 9300 gosub200:print"[153]  you have found an ancient elevator!":ifau>350thenprint" to use the elevator, you will have to"
  193. 9304 ifau>350thenprint"  leave";au-350;"gold pieces behind."
  194. 9306 print"     use the elevator? (y or n)":gosub1300:b$=a$:ifb$="n"thenreturn
  195. 9310 ifb$<>"y"thenprint"[145][145][145]":goto9306
  196. 9312 gosub9750:l=l-int(rnd(.)*l/2)-2:ifau>350thenau=350
  197. 9314 return
  198. 9400 gosub9950:gosub200:geta$:a$="":ifa(b+3)>0thenm=a(b+3)
  199. 9404 ifa(b+3)>0thengosub600:print"[155] awaits you!   "
  200. 9406 ifa(b+3)=0thengosub200:gosub9600:printtab(9)"an unoccupied cell"
  201. 9408 gosub303:ifa(b+6)>1thenprint"[158]  and"a(b+6)a$(101):gosub9600
  202. 9410 ifa(b+9)>0thenprint"[154]  plus "a$(q):tr=tr+1:gosub9600
  203. 9412 fori=12to15step3:q=q+1:ifa(b+i)>0thenprint"[154]  plus "a$(q+1-(9andq+1>111)):tr=tr+1:gosub9600
  204. 9416 next:ifa(b+3)>0thenprint"[145]":gosub507
  205. 9420 au=au+a(b+6):forc=9to15step3:gosub301:ifa(b+c)>0anda(b+c)<25thene=e+r
  206. 9424 ifa(b+c)>23thens=s+1
  207. 9426 gosub300:ifa(b+3)>0andn=2andr<5then800
  208. 9428 next:fort=1to2000:next:return
  209. 9500 gosub125:pokes1+24,15:pokes1+5,50:forx1=1to10:pokes1+1,x1+10:pokes1+4,33:poke53281,9:poke53280,11:poke53280,9:poke53281,0:fort=1to10:next:pokes1+4,16:next:poke53280,11:gosub125:return
  210. 9550 gosub125:pokes1+24,15:pokes1+5,50:forx1=90to3step-2:pokes1+1,x1:pokes1+24,15:pokes1+4,33:pokes1+6,144:fori=1tox1:next:pokes1+4,129:pokes1+24,0:next:fort=15to0step-1:fori=1to100:next:pokes1+24,t:next:gosub125:return
  211. 9600 gosub125:pokes1+1,40:pokes1+5,9:pokes1+6,40:pokes1+24,15:pokes1+4,17:fort=1to400:next:gosub125:return
  212. 9650 gosub125:fori=1to3:forx1=1to3:pokes1+24,15:pokes1+1,(x1+2)*10:pokes1+6,255:pokes1+4,17:fort=1to100:next:next:next:fort=1to300:next:gosub125:return
  213. 9700 l=l+1:gosub125:pokes1+24,15:pokes1+5,8:forx1=15to1step-1:pokes1+1,x1+12:pokes1+24,x1:pokes1+4,129:fort=1to70:next:pokes1+4,128:ifx1/2-int(x1/2)<.10thenfort=1to150:next
  214. 9708 next:gosub125:return
  215. 9750 gosub125:pokes1+24,15:pokes1+5,60:fori=30to100step3:pokes1+1,i:pokes1+4,17:pokes1+6,100:next:fort=1to2000:next:fori=100to10step-2:pokes1+1,i:pokes1+4,17:pokes1+6,100:next:gosub125:return
  216. 9800 l=l-1:gosub125:pokes1+24,15:pokes1+5,7:forx1=3to18:pokes1+24,45/x1:pokes1+1,x1*4:pokes1,200:pokes1+4,129:fort=1to180:next:ifx1/2-int(x1)=0thenfort=1to50:next
  217. 9808 pokes1+4,128:next:pokes1+1,50:fort=1to200:next:pokes+4,128:gosub125:return
  218. 9850 gosub125:pokes1+24,10:pokes1+6,240:pokes1+4,17:fori=1to3:poke53280,13:poke53281,13:poke53280,11:poke53281,0:forx1=1to255step25:pokes1+1,x1:next:next:pokes1+4,32:gosub125:return
  219. 9900 gosub125:fort=15to1step-1:pokes1+24,t:pokes1+5,4:pokes1+1,50:pokes1+4,128:forx=1to30:pokes1+4,129:next:next:gosub125:return
  220. 9950 gosub125:fort=50to0step-2:pokes1+24,15:pokes1+5,136:pokes1+1,t:pokes1+4,33:pokes1+4,32:next:gosub125:return
  221. 10000 gosub125:pokes1+24,15:pokes1+5,50:forx1=1to5:pokes1+1,rnd(.)*10+2:pokes1+4,33:pokes1+6,144:fort=1to300:next:pokes1+4,32:next:gosub125:return
  222. 10100 gosub125:pokes1,10:pokes1+1,20:pokes1+5,8:pokes1+6,128:pokes1+24,0:pokes1+4,129:ford=1to55:pokes1+24,d/8:geta$:ifa$=""thennext:goto10114
  223. 10113 return
  224. 10114 ford=30to1step-1:pokes1+24,d/5:geta$:ifa$=""thennext:goto10118
  225. 10115 return
  226. 10118 pokes1,10:pokes1+1,50:pokes1+5,8:pokes1+6,128:pokes1+4,129:ford=1to65:pokes1+24,d/8:geta$:ifa$=""thennext:goto10126
  227. 10125 return
  228. 10126 ford=60to1step-1:pokes1+24,d/5:geta$:ifa$=""thennext:return
  229. 10127 return
  230. 10200 gosub125:pokes1+24,15:pokes1+5,60:pokes1+1,4:fori=1to12:pokes1+4,33:pokes1+2,100:pokes1+5,200:pokes1+6,80:next:gosub125:return
  231. 10300 pokes1+24,15:pokes1+5,50:forx1=58to8step-1:pokes1+1,x1*3:pokes1+4,17:pokes1+4,16:fori=1to2:next:next:fort=1to300:next:fori=1to6:pokes1+24,15:pokes1+4,33:pokes1+1,5:pokes1+2,100:pokes1+5,200:pokes1+6,50:next:gosub125:return
  232. 10350 pokes1+24,15:pokes1+5,50:forx=1to50:pokes1+1,rnd(x)*32+50:pokes1+4,17:fori=1to10:next:pokes1+4,16:next:return
  233. 10400 gosub125
  234. 10406 pokes1+24,15:pokes1+5,143:pokes1+1,5:pokes1+4,129:return
  235.